<template>
  <div class="emr-content-module module-personality">
    <h3 id="personality">现病史</h3>
    <h3 style="display: block">症状</h3>
    <div class="content-wrapper" :class="{ locked: d.disabled }">
      <span>患者自</span>
      <el-select
        clearable
        size="medium"
        :disabled="d.disabled"
        v-model="d.presentIllnessHistory.attr1"
        v-if="!d.disabled"
        placeholder=""
        style="width: 5rem"
      >
        <el-option
          v-for="item in FULLYEARS"
          :value="item + ''"
          :key="'YEARS_KEY_' + item"
        >
          {{ item }}
        </el-option>
      </el-select>
      <span>年</span>
      <el-select
        clearable
        size="medium"
        :disabled="d.disabled"
        v-model="d.presentIllnessHistory.attr2"
        placeholder=""
        style="width: 4rem"
      >
        <el-option
          v-for="item in MONTHS"
          :value="item + ''"
          :key="'YEARS_KEY_' + item"
        >
          {{ item }}
        </el-option>
      </el-select>
      <span>月开始出现</span>
      <span class="inline-block">
        <el-checkbox-group v-model="d.presentIllnessHistory.attr3">
          <el-checkbox
            size="medium"
            label="反复"
            :disabled="d.disabled"
          ></el-checkbox>
          <el-checkbox
            size="medium"
            label="鼻塞"
            :disabled="d.disabled"
          ></el-checkbox>
          <el-checkbox
            size="medium"
            label="清水样涕"
            :disabled="d.disabled"
          ></el-checkbox>
          <el-checkbox
            size="medium"
            label="打喷嚏"
            :disabled="d.disabled"
          ></el-checkbox>
          <el-checkbox
            size="medium"
            label="鼻痒"
            :disabled="d.disabled"
          ></el-checkbox>
        </el-checkbox-group>
      </span>
      <span>(每天症状持续或累计</span>
      <el-checkbox
        size="medium"
        :disabled="d.disabled"
        v-model="d.presentIllnessHistory.attr4"
      >
        约1小时以上
      </el-checkbox>
      <span>),症状通常持续</span>
      <el-input
        v-model="d.presentIllnessHistory.attr5"
        placeholder=""
        :disabled="d.disabled"
        size="medium"
        maxlength="4"
        style="width: 4rem"
        v-number:2
      ></el-input>
      <span>周,</span>
      <el-input
        v-model="d.presentIllnessHistory.attr6"
        placeholder=""
        :disabled="d.disabled"
        size="medium"
        maxlength="4"
        style="width: 4rem"
        v-number:2
      ></el-input>
      <span>天/周,</span>
      <span class="inline-block">
        <el-checkbox-group v-model="d.presentIllnessHistory.attr7">
          <el-checkbox
            size="medium"
            label="伴眼痒"
            :disabled="d.disabled"
          ></el-checkbox>
          <el-checkbox
            size="medium"
            label="结膜充血"
            :disabled="d.disabled"
          ></el-checkbox>
          <el-checkbox
            size="medium"
            label="变应性敬礼"
            :disabled="d.disabled"
          ></el-checkbox>
          <el-checkbox
            size="medium"
            label="歪口"
            :disabled="d.disabled"
          ></el-checkbox>
          <el-checkbox
            size="medium"
            label="耸鼻"
            :disabled="d.disabled"
          ></el-checkbox>
          <el-checkbox
            size="medium"
            label="做鬼脸"
            :disabled="d.disabled"
          ></el-checkbox>
          <el-checkbox
            size="medium"
            label="喷嚏多于晨起时发作"
            :disabled="d.disabled"
          ></el-checkbox>
        </el-checkbox-group>
      </span>
      <span v-if="d.presentIllnessHistory.attr7.includes('喷嚏多于晨起时发作')">
        为
      </span>
      <el-radio-group
        v-model="d.presentIllnessHistory.attr8"
        v-if="d.presentIllnessHistory.attr7.includes('喷嚏多于晨起时发作')"
      >
        <el-radio size="medium" label="偶发" :disabled="d.disabled"></el-radio>
        <el-radio size="medium" label="连续" :disabled="d.disabled"></el-radio>
      </el-radio-group>
      <span>。</span>
      <div>
        <span>喷嚏之后</span>
        <el-radio-group v-model="d.presentIllnessHistory.attr9">
          <el-radio
            size="medium"
            label="清水样鼻涕"
            :disabled="d.disabled"
          ></el-radio>
          <el-radio
            size="medium"
            label="脓性"
            :disabled="d.disabled"
          ></el-radio>
        </el-radio-group>
        <span>并伴有如下症状:</span>
        <span class="inline-block">
          <el-checkbox-group v-model="d.presentIllnessHistory.attr10">
            <el-checkbox
              size="medium"
              label="伴睡眠不稳"
              :disabled="d.disabled"
            ></el-checkbox>
            <el-checkbox
              size="medium"
              label="情绪不安"
              :disabled="d.disabled"
            ></el-checkbox>
            <el-checkbox
              size="medium"
              label="注意力不集中"
              :disabled="d.disabled"
            ></el-checkbox>
            <el-checkbox
              size="medium"
              label="学习成绩下降"
              :disabled="d.disabled"
            ></el-checkbox>
            <el-checkbox
              size="medium"
              label="伴喘息"
              :disabled="d.disabled"
            ></el-checkbox>
            <el-checkbox
              size="medium"
              label="咳嗽"
              :disabled="d.disabled"
            ></el-checkbox>
            <el-checkbox
              size="medium"
              label="气急"
              :disabled="d.disabled"
            ></el-checkbox>
            <el-checkbox
              size="medium"
              label="胸闷"
              :disabled="d.disabled"
            ></el-checkbox>
            <el-checkbox
              size="medium"
              label="支气管哮喘"
              :disabled="d.disabled"
            ></el-checkbox>
            <el-checkbox
              size="medium"
              label="鼻气道高反应性"
              :disabled="d.disabled"
            ></el-checkbox>
          </el-checkbox-group>
        </span>
        <el-input
          size="medium"
          type="textarea"
          :disabled="d.disabled"
          placeholder="补充内容,限制100个字符以内 "
          :maxlength="100"
          :autosize="{ minRows: 1, maxRows: 4 }"
          v-model="d.presentIllnessHistory.attr11"
          style="margin-top: 0.5rem"
        ></el-input>
      </div>
    </div>

    <h3 style="display: block">严重程度分类</h3>
    <div class="content-wrapper" :class="{ locked: d.disabled }">
      <el-radio-group v-model="d.presentIllnessHistory.attr12">
        <div>
          <el-radio size="medium" label="轻度" :disabled="d.disabled">
            轻度
          </el-radio>
          <span class="radio_tip">
            症状轻微，对生活质量（睡眠、日常生活、工作和学习）未产生明显影响；
          </span>
        </div>
        <div>
          <el-radio size="medium" label="中-重度" :disabled="d.disabled">
            中-重度
          </el-radio>
          <span class="radio_tip">
            症状较重或严重，对生活质量产生明显影响。
          </span>
        </div>
      </el-radio-group>
    </div>

    <h3 style="display: block">变应原种类分类</h3>
    <div class="content-wrapper" :class="{ locked: d.disabled }">
      <el-radio-group v-model="d.presentIllnessHistory.attr13">
        <div>
          <el-radio
            size="medium"
            label="季节性变应性鼻炎"
            :disabled="d.disabled"
          >
            季节性变应性鼻炎
          </el-radio>
          <span style="display: inline-block">
            <el-checkbox-group v-model="d.presentIllnessHistory.attr14">
              <el-checkbox
                size="medium"
                label="春季"
                :disabled="d.disabled"
              ></el-checkbox>
              <el-checkbox
                size="medium"
                label="夏季"
                :disabled="d.disabled"
              ></el-checkbox>
              <el-checkbox
                size="medium"
                label="秋季"
                :disabled="d.disabled"
              ></el-checkbox>
              <el-checkbox
                size="medium"
                label="冬季"
                :disabled="d.disabled"
              ></el-checkbox>
            </el-checkbox-group>
          </span>
          <span class="radio_tip">常见致敏原为</span>
          <span style="display: inline-block">
            <el-checkbox-group v-model="d.presentIllnessHistory.attr15">
              <el-checkbox
                size="medium"
                label="花粉"
                :disabled="d.disabled"
              ></el-checkbox>
              <el-checkbox
                size="medium"
                label="真菌"
                :disabled="d.disabled"
              ></el-checkbox>
            </el-checkbox-group>
          </span>
          <span class="radio_tip">等季节性吸入性变应原。</span>
        </div>
        <div>
          <el-radio
            size="medium"
            label="常年性变应性鼻炎"
            :disabled="d.disabled"
          >
            常年性变应性鼻炎
          </el-radio>
          <span class="radio_tip">症状发作呈常年性，常见致敏原为</span>
          <span style="display: inline-block">
            <el-checkbox-group v-model="d.presentIllnessHistory.attr16">
              <el-checkbox
                size="medium"
                label="尘螨"
                :disabled="d.disabled"
              ></el-checkbox>
              <el-checkbox
                size="medium"
                label="霉菌"
                :disabled="d.disabled"
              ></el-checkbox>
              <el-checkbox
                size="medium"
                label="蟑螂"
                :disabled="d.disabled"
              ></el-checkbox>
              <el-checkbox
                size="medium"
                label="动物皮屑"
                :disabled="d.disabled"
              ></el-checkbox>
            </el-checkbox-group>
          </span>
          <span class="radio_tip">
            等室内常年性吸入物变应原，以及某些职业性变应原
          </span>
          <el-input
            v-model="d.presentIllnessHistory.attr17"
            placeholder=""
            :disabled="d.disabled"
            size="medium"
            style="width: 4rem"
          ></el-input>
        </div>
      </el-radio-group>
    </div>

    <h3>鉴别</h3>
    <div class="content-wrapper" :class="{ locked: d.disabled }">
      <div>
        <span>血管运动性鼻炎: 诱因:</span>
        <span style="display: inline-block">
          <el-checkbox-group v-model="d.presentIllnessHistory.attr18">
            <el-checkbox size="medium" label="物理" :disabled="d.disabled">
              物理
            </el-checkbox>
            <el-checkbox size="medium" label="化学" :disabled="d.disabled">
              化学（温度、湿度、气压、刺激气味等环境因素）
            </el-checkbox>
            <el-checkbox size="medium" label="精神因素" :disabled="d.disabled">
              精神因素
            </el-checkbox>
          </el-checkbox-group>
        </span>
      </div>
      <div>
        <span>阿司匹林不耐受三联征：诱因：</span>
        <span style="display: inline-block">
          <el-checkbox-group v-model="d.presentIllnessHistory.attr19">
            <el-checkbox
              size="medium"
              label="水杨酸制剂"
              :disabled="d.disabled"
            >
              水杨酸制剂
            </el-checkbox>
            <el-checkbox
              size="medium"
              label="其他解热镇痛药"
              :disabled="d.disabled"
            >
              其他解热镇痛药
            </el-checkbox>
          </el-checkbox-group>
        </span>
        <span>可诱发鼻炎和哮喘发作，可伴有荨麻疹和血管性水肿等。</span>
      </div>
      <div>
        <span>脑脊液鼻漏：</span>
        <span style="display: inline-block">
          <el-checkbox-group v-model="d.presentIllnessHistory.attr20">
            <el-checkbox
              size="medium"
              label="多有头部外伤史"
              :disabled="d.disabled"
            >
              多有头部外伤史
            </el-checkbox>
            <el-checkbox
              size="medium"
              label="临床表现为持续或间断清水样涕"
              :disabled="d.disabled"
            >
              临床表现为持续或间断清水样涕
            </el-checkbox>
            <el-checkbox
              size="medium"
              label="在低头用力、压迫颈静脉等情况下有流量增加"
              :disabled="d.disabled"
            >
              在低头用力、压迫颈静脉等情况下有流量增加
            </el-checkbox>
          </el-checkbox-group>
        </span>
        <span>的特点</span>
      </div>
    </div>

    <h3>症状持续时间分类</h3>
    <div class="content-wrapper" :class="{ locked: d.disabled }">
      <el-radio-group v-model="d.presentIllnessHistory.attr21">
        <div>
          <el-radio
            size="medium"
            label="间歇性变应性鼻炎"
            :disabled="d.disabled"
          >
            间歇性变应性鼻炎
          </el-radio>
          <span class="radio_tip">症状表现＜4 天/周，或＜连续4周；</span>
        </div>
        <div>
          <el-radio size="medium" label="中-重度" :disabled="d.disabled">
            持续性变应性鼻炎
          </el-radio>
          <span class="radio_tip">症状表现≥4 天/周，且≥连续4周。</span>
        </div>
      </el-radio-group>
    </div>

    <h3>其他</h3>
    <div class="content-wrapper" :class="{ locked: d.disabled }">
      <div>
        <span>胃纳：</span>
        <el-radio-group v-model="d.presentIllnessHistory.attr22">
          <el-radio
            size="medium"
            label="如常"
            :disabled="d.disabled"
          ></el-radio>
          <el-radio
            size="medium"
            label="减少"
            :disabled="d.disabled"
          ></el-radio>
          <el-radio
            size="medium"
            label="据食"
            :disabled="d.disabled"
          ></el-radio>
        </el-radio-group>
        <span>呕吐：</span>
        <el-radio-group v-model="d.presentIllnessHistory.attr23">
          <el-radio size="medium" label="0" :disabled="d.disabled">无</el-radio>
          <el-radio size="medium" label="1" :disabled="d.disabled">有</el-radio>
        </el-radio-group>
        <span>大便：</span>
        <el-radio-group v-model="d.presentIllnessHistory.attr24">
          <el-radio size="medium" label="0" :disabled="d.disabled">
            正常
          </el-radio>
          <el-radio size="medium" label="1" :disabled="d.disabled">
            异常
          </el-radio>
        </el-radio-group>
      </div>
      <div>
        <span>小便：</span>
        <el-radio-group v-model="d.presentIllnessHistory.attr25">
          <el-radio
            size="medium"
            label="正常"
            :disabled="d.disabled"
          ></el-radio>
          <el-radio
            size="medium"
            label="异常"
            :disabled="d.disabled"
          ></el-radio>
        </el-radio-group>
        <el-input
          v-model="d.presentIllnessHistory.attr26"
          placeholder=""
          :disabled="d.disabled"
          size="medium"
          style="width: 20rem"
        ></el-input>
      </div>
    </div>
  </div>
</template>
<script>
  import { reactive, inject } from 'vue'
  export default {
    name: 'presentIllnessHistory',
    setup() {
      const initForm = function () {
        return {
          attr1: null,
          attr2: null,
          attr3: [],
          attr4: null,
          attr5: null,
          attr6: null,
          attr7: [],
          attr8: null,
          attr9: null,
          attr10: [],
          attr11: null,
          attr12: null,
          attr13: null,
          attr14: [],
          attr15: [],
          attr16: [],
          attr17: null,
          attr18: [],
          attr19: [],
          attr20: [],
          attr21: null,
          attr22: null,
          attr23: null,
          attr24: null,
          attr25: null,
        }
      }
      const d = reactive({ presentIllnessHistory: initForm(), disabled: false })
      const FULLYEARS = inject('FULLYEARS')
      const MONTHS = inject('MONTHS')
      const DAYS = inject('DAYS')
      return {
        d,
        FULLYEARS,
        MONTHS,
        DAYS,
      }
    },
  }
</script>
<style lang="scss" scoped>
  @import '@/styles/emr.scss';
</style>
